package com.mangguo.tingjian.content.service.impl;

import com.mangguo.tingjian.content.entity.TagConf;
import com.mangguo.tingjian.content.mapper.TagConfMapper;
import com.mangguo.tingjian.content.service.ITagConfService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 内容数据页tag配置 服务实现类
 * </p>
 *
 * @author auto
 * @since 2019-11-24
 */
@Service
@AllArgsConstructor
public class TagConfServiceImpl extends ServiceImpl<TagConfMapper, TagConf> implements ITagConfService {
    private final TagConfMapper tagConfMapper;

    @Override
    public List<TagConf> selectLvl1TagConfByType(Integer type) {
        return tagConfMapper.selectTagConfByTypeAndTagLvl(type, 1);
    }

    @Override
    public List<TagConf> selectLvl2TagConfByTypeAndParentId(Integer type, Long parentId) {
        return tagConfMapper.selectTagConfByTypeAndParentId(type, parentId);
    }
}
